#if defined(GENERIC) || !defined(G_ARRAY_H)
#define G_ARRAY_H

/*
 ******************************
 * Object Oriented Programming in C
 *
 * Author: Laurent Deniau, Laurent.Deniau@cern.ch
 *
 * For more information, please see the paper:
 * http://home.cern.ch/ldeniau/html/oopc/oopc.html
 *
 ******************************
 */

#include <g_memBlock.h>

/*-----------------------------*/
/*   Generic array interface   */
/*    inherit from memBlock    */
/*-----------------------------*/

#undef  OBJECT
#define OBJECT GENERIC(array)

/* Object interface */
OBJECT_INTERFACE

  INHERIT_MEMBERS_OF(GENERIC(memBlock));

  gType1* private(data);

OBJECT_METHODS

  INHERIT_METHODS_OF(GENERIC(memBlock));

  gType1* method(getData);
  void method_(startAt) int i __;
  void method_(set) size_t i, gType1 x __;
  gType1 constMethod_(get) size_t i __;

ENDOF_INTERFACE

/* Class interface */
CLASS_INTERFACE

  t_OBJECT*const classMethod_(new) size_t n __;
  t_OBJECT*const classMethod_(newRef) gType1 *const t __;

  void method_(init) size_t n __;
  void method_(initRef) gType1 *const t __;

ENDOF_INTERFACE

#endif
